-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Clear RUSTUP_* environment variables in test_env
#16469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
r? @weihanglo rustbot has assigned @weihanglo. Use |
c052016 to
d4f36b3
Compare
|
I could use some help determining why the doctests are failing. |
|
I reran the jobs. I think the runner was just flaky. |
|
I'm going to try to find machines resembling the failing platforms that I can test this on. |
|
So is the reason |
I'm still investigating. I will reply within the next few days. |
That would make sense. Are you opposed to running rustup entirely? I'm asking because this problem could be solved somewhat easily if one could run |
|
As long as it can gracefully work with the absence of rustup |
Rustup's logic for this appears nontrivial: https://github.com/rust-lang/rustup/blob/3382f6f7bf09e591bbda4bcda7daf2280a0061d9/src/cli/rustup_mode.rs#L1033 And clearly, Cargo's tests currently rely on Rustup. So, if Rustup is not available, is it acceptable to require the user to take additional action, e.g., specify rustc's path in an environment variable? The only other option I can see is to get rustc's path in a build script, which I assume is still objected to. If no other option seems viable, I have some questions, because I still do not understand the objections to using a build script. |
|
I think there might be a disconnect.
My thought was that we effectively do
Why do you say that? From my understanding it doesn't; I believe we have workarounds for tests that have behavior changes with and without rustup |
I'm with you up to this point.
^ This is the part I am worried about. On my machine, Are you thinking that will only be the case if rustc was installed with So, for example, if a user does the following and it fails, it's their problem? CARGO=$(rustup which cargo)
unset RUSTUP_HOME
$CARGO test(Sorry if this is a rabbit hole.) |
This PR clears all
RUSTUP_*environment variables in effort to create a "clean" environment.However, some tests fail when
RUSTUP_HOMEis cleared. This PR setsRUSTUP_HOMEfor those tests, so that they might be further investigated.This PR came out of #16131 (comment) and #16131 (comment).